package com.athu.study.config;

import dev.langchain4j.community.model.dashscope.WanxImageModel;
import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import dev.langchain4j.model.openai.OpenAiImageModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class LLMConfig {
    @Bean
    public ChatModel chatModelQwen(){
        return OpenAiChatModel.builder().
                apiKey(System.getenv("aliQwen-api")).
                modelName("qwen-vl-max").
                baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1").build();
    }
    @Bean
    public WanxImageModel wanxImageModel(){
        return WanxImageModel.builder().
                apiKey(System.getenv("aliQwen-api")).
                modelName("wan2.2-t2i-plus").build();//图片生成 https://help.aliyun.com/zh/model-studio/text-to-image
    }
}
